import axios from '../axios'

/*
 * 部门管理模块
 */

// 分页查询
export const getDeptList = (data) => {
  return axios({
    url: 'dept/list',
    method: 'get',
    data
  })
}
// 增加部门
export const addDept = (data) => {
  return axios({
    url: 'dept/add',
    method: 'post',
    data
  })
}

// 删除部门
export const delDept = (data) => {
  return axios({
    url: 'dept/del',
    method: 'get',
    params: {
      deptId: data
    }
  })
}

// 修改部门
export const updateDept = (data) => {
  return axios({
    url: 'dept/update',
    method: 'post',
    data
  })
}
